﻿using System.Collections.Generic;

namespace NoORM.Core.Contract
{
    /// <summary>
    /// sql请求
    /// </summary>
    public class SqlRequest
    {
        /// <summary>
        /// select 子句中的字段
        /// </summary>
        public List<string> Fields { get; set; }

        /// <summary>
        /// where子句中的查询表达式
        /// </summary>
        public List<QueryExpression> Queries { get; set; }

        /// <summary>
        /// 数据
        /// </summary>
        public Dictionary<string,object> Data { get; set; }

        /// <summary>
        /// 分组字段
        /// </summary>
        public List<string> GroupFields { get; set; }

        /// <summary>
        /// 函数表达式
        /// </summary>
        public List<FuncExpression> Functions { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        public string OrderBy { get; set; }

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 第几页,从0开始
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// in或not in 子句中包含的值
        /// </summary>
        public List<object> Values { get; set; }
    }
}
